import 'package:rongcloud_im_wrapper_plugin/rongcloud_im_wrapper_plugin.dart';

class ZtImConversationModel {
  int? unreadCount;
  String? userId;
  int? operationTime;
  String? nickname;
  String? avatarUrl;
  String? lastMessage;
  RCIMIWConversationType? conversationType;
  RCIMIWMessageType? lastMessageType;
  ZtImConversationModel(
      {this.unreadCount,
      this.userId,
      this.nickname,
      this.conversationType,
      this.operationTime,
      this.lastMessage,
      this.lastMessageType,
      this.avatarUrl});

  ZtImConversationModel.fromJson(Map<String, dynamic> json) {
    operationTime = json['operationTime'];
    unreadCount = json['unreadCount'];
    userId = json['userId'];
    nickname = json['nickname'];
    conversationType = json['conversationType'];
    lastMessage = json['lastMessage'];
    lastMessageType = json['lastMessageType'];
    avatarUrl = json['avatarUrl'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['unreadCount'] = unreadCount;
    data['userId'] = userId;
    data['nickname'] = nickname;
    data['conversationType'] = conversationType;
    data['avatarUrl'] = avatarUrl;
    data['lastMessageType'] = lastMessageType;
    data['lastMessage'] = lastMessage;
    return data;
  }
}
